[π λ°©νμΆ μμ½ μΈλΆ API μ°λ 3λ¨κ³] ν°λ΄ λ―Έμ μ μΆν©λλ€.#699
Merged
Conversation
- capacityμ refillPerSecλ₯Ό κ°μ§ ν ν° λ²ν·μ μΈλΆ μμ‘΄μ± μμ΄ μΆκ° - 보좩λμ λ§μ§λ§ 보좩 μ΄ν κ²½κ³Ό μκ° Γ refillPerSecλ‘ κ³μ°νκ³ capacityλ₯Ό μνμΌλ‘ μ μ§ - tryConsumeμΌλ‘ ν ν°μ 1κ°μ© μλΉνκ³ retryAfterSecondsλ‘ 1κ°κ° μ°° λκΉμ§ νμν μ΄λ₯Ό μ¬λ¦ΌμΌλ‘ λ°ν - μκ° μμ‘΄μ LongSupplierλ‘ μ£Όμ ν΄ κ°μ§ μκ³λ‘ κ²°μ μ ν μ€νΈνκ³ synchronizedλ‘ λμμ± λ³΄μ₯
- HandlerInterceptorλ‘ preHandleμμ tryConsumeμ΄ μ€ν¨νλ©΄ 컨νΈλ‘€λ¬λ₯Ό νΈμΆνμ§ μκ³ 429μ Retry-After ν€λλ‘ μλ΅ - /reservationsμ /payments κ²½λ‘μ μΈν°μ ν°λ₯Ό λ±λ‘νκ³ μΈλ°μ΄λ ν ν° λ²ν·μ λΉμΌλ‘ λΆλ¦¬ - capacityΒ·refillPerSecλ₯Ό rate-limit.*λ‘ μΈλΆνν΄ μ½λ μμ μμ΄ κ±°λΆ μμ μ μ‘°μ
- ν μ€ νΈμΆ RestClientμ ClientHttpRequestInterceptorλ₯Ό λ±λ‘ν΄ 429λ©΄ Retry-After μ΄λ§νΌ λκΈ° ν μ¬μλ - Retry-Afterκ° μμΌλ©΄ κΈ°λ³Έ κ°κ²©μΌλ‘ ν΄λ°±νκ³ maxAttemptsλ₯Ό λμΌλ©΄ λλ©μΈ μμΈλ‘ μ€ν¨ν΄ 무ν μ¬μλλ₯Ό μ°¨λ¨ - λκΈ° λμμ Sleeperλ‘ μ£Όμ ν΄ ν μ€νΈμμ μ€μ λκΈ° μμ΄ μ¬μλ νμμ κ°κ²©μ κ²μ¦ - maxAttemptsΒ·κΈ°λ³Έ κ°κ²©μ toss.retry.*λ‘ μΈλΆν
- κ²μ΄νΈμ¨μ΄ RestClientμ μΈν°μ ν°λ₯Ό νλ λ λ±λ‘ν΄ νΈμΆ μ tryConsumeμΌλ‘ ν ν°μ μλΉνκ³ μμΌλ©΄ μΈλΆλ‘ 보λ΄μ§ μκ³ OutboundRateLimitExceptionμΌλ‘ κ±°λΆ - λ€μ΄μ€λ μͺ½κ³Ό κ°μ TokenBucketRateLimiterλ₯Ό λ°©ν₯λ§ λ°κΏ μ¬μ¬μ©νκ³ λκ°λ νλλ₯Ό outbound-rate-limit.*λ‘ λΆλ¦¬ μΈλΆν - κ±°λΆ μ 503κ³Ό Retry-After ν€λλ‘ μλ΅νλλ‘ μμΈ νΈλ€λ¬μ ProblemTypeμ μΆκ°
- λ€μ λμ μμ²μ κ°λ³κ² μμ±νλλ‘ κ³ μ μ€λ λ νμ κ°μ μ€λ λ νλ‘ κ΅μ²΄
picetea44
approved these changes
Jun 28, 2026
picetea44
left a comment
There was a problem hiding this comment.
ν ν° λ²ν·μ μΈλΆ μμ‘΄μ± μμ΄ μ§μ ꡬννμ λΆλΆμ΄ μΈμμ μ΄μμ΅λλ€!
μ λ°μ μΌλ‘ λ―Έμ
ν΅μ¬ μ§μ λ μ μ§μΌμ κ² κ°κ³ λ²ν· μ¬μ¬μ© λΆλΆλ μ μ‘μΌμ
¨λ€μ
λ 벨2 λ무 κ³ μ λ§μΌμ ¨κ³ λ¨Έμ§ν΄λλ¦¬κ² μ΅λλ€
Comment on lines
+19
to
+22
| public void addInterceptors(InterceptorRegistry registry) { | ||
| registry.addInterceptor(rateLimitInterceptor) | ||
| .addPathPatterns("/reservations", "/payments/**"); | ||
| } |
There was a problem hiding this comment.
μμ½ μλν¬μΈνΈμ νλλ₯Ό μ μ©νμ€ λ μ ν κ²½λ‘λ₯Ό μ¬μ©νμ κ² κ°μ΅λλ€.
νΉμ μ νν '/reservation'μμ½κ³Ό κ΄λ ¨ν κ²½λ‘λ§ μ²λ¦¬νμλ €λ μλμ
¨λμ§ κΆκΈν©λλ€
Comment on lines
+60
to
+61
| .requestInterceptor(tossRetryAfterInterceptor) | ||
| .requestInterceptor(tossOutboundRateLimitInterceptor) |
There was a problem hiding this comment.
νμ¬ μΈν°μ ν°λ₯Ό Retry -> Outbound μμΌλ‘ λ±λ‘νμ μ μ λν΄μ μμμ λν μ ν μ§μ μ΄ μμΌμ ¨λμ§ κΆκΈν©λλ€!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
μ²΄ν¬ λ¦¬μ€νΈ
testλ₯Ό μ€ννμ λ, λͺ¨λ ν μ€νΈκ° μ μμ μΌλ‘ ν΅κ³Όνλμ?λ² μ΄μ€ μ½λ μ ν 체ν¬
μ΄λ€ λΆλΆμ μ§μ€νμ¬ λ¦¬λ·°ν΄μΌ ν κΉμ?